package com.janlei.reference;

import java.lang.ref.SoftReference;

public class SoftRefStu {

    static void excute() {
        System.out.println("start");
        Obj obj = new Obj();
        SoftReference<Obj> sr = new SoftReference<Obj>(obj);
        obj = null;
        System.out.println(sr.get());
        System.out.println("end");
    }
}

class Obj {
    int[] obj;

    public Obj() {
        obj = new int[1000];
    }
}